\documentclass[svgnames,12pt,a4paper]{book}
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{float}
\usepackage{array}
\usepackage{tikz}
\usepackage{longtable}
\usepackage{enumerate}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{fancyvrb}
\usepackage{wasysym}
\usepackage[online]{suthesis-2e}
\usepackage{todonotes}
\usepackage{caption}
\usepackage{minted}
\usepackage{setspace}
\usetikzlibrary{%
   decorations.fractals%
  ,decorations.pathmorphing%
  ,shadows%
}

\definecolor{MyDarkBlue}{rgb}{0,0.08,0.45}
\definecolor{lightgray}{rgb}{0.9,0.9,0.9}
\definecolor{lightlightgray}{rgb}{0.95,0.95,0.95}


%% begin listing configuration 
\lstset{
  % basicstyle=\footnotesize\ttfamily,
  basicstyle=\scriptsize,
  numberstyle=\tiny,
  % numbers=left,
  stepnumber=5,
  numbersep=5pt,
  tabsize=2,
  extendedchars=true,
  breaklines=true,
  keywordstyle=\color{blue}\bfseries, % to do
  stringstyle=\color{orange}\ttfamily, %to do
  identifierstyle=\color{teal},
  showstringspaces=true,
  showspaces=false,
  showtabs=false,
  % xleftmargin=17pt,
  framexrightmargin=5pt,
  framexbottommargin=4pt,
  % backgroundcolor=\color{lightgray}, % to do
  commentstyle=\color{red},% todo 
  % frame=lines,
  frame=bottom,
  backgroundcolor=\color{lightlightgray},
  framerule=1pt,
  % emph={square,root},
  % emphstyle=\underbar,
  %% language={[Objective]Caml},
}
\DeclareCaptionFont{green}{\color{green}}
\DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35,
    0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}

\captionsetup[lstlisting]{format=listing,labelfont=green,textfont=green, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}

%% end
\makeatletter
\makeatother

% \newenvironment{ocamlcode}{\Verbatim[fomartcom=\color{blue}]}{\endVerbatim}
% New commands serve as shorthand for frequently used command combinations.
% \newcommand{\ind}[1]{\mathbf{1}\left(#1\right)}
% \newcommand{\bx}{\mathbf{x}}
% \newcommand{\E}{\mathbf{E}}
% \DefineVerbatimEnvironment{ocamlcode}{Verbatim}{formatcom=\color{red},fontsize=\scriptsize}
% \DefineVerbatimEnvironment{bluetext}{Verbatim}{formatcom=\color{MyDarkBlue},fontsize=\scriptsize}
% \DefineVerbatimEnvironment{ocamlcode}{Verbatim}{formatcom=\color{blue},fontsize=\scriptsize}
% \lstnewenvironment{ocamlcode}
% {\singlespacing}{}


\usepackage{etoolbox}

\setlength\partopsep{-\topsep}
\addtolength\partopsep{-\parskip}
\addtolength\partopsep{0.5cm}
\newcommand{\ChangeLine}[1]{%
\ifodd\value{FancyVerbLine}%
\textcolor{red}{#1}\else\textcolor{blue}{#1}\fi}


\newminted{ocaml}
{fontsize=\scriptsize, %bgcolor=lightlightgray,
  frame=lines, framesep=2mm, numbersep=5pt,
  linenos}
\newminted{bash}
{fontsize=\scriptsize, %bgcolor=lightlightgray,
  frame=lines, framesep=2mm, numbersep=5pt,
  linenos}

\lstnewenvironment{bluetext}
{\singlespacing\lstset{backgroundcolor=\color{lightgray}}}{}

\DefineVerbatimEnvironment{alternate}{Verbatim}%
{formatcom=\renewcommand{\FancyVerbFormatLine}{\ChangeLine},%
fontsize=\scriptsize,frame=lines}{}
%% \includeonly{camlp4/gram}
%% \includeonly{cover}
\input{contents.tex}




%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "master"
%%% End: 
